<extend name="Public/base"/>


<block name="body">
	<!-- 标题 -->
	<div class="main-title">
		<h2>用户提现申请处理</h2>
	</div>

    <p>
        用户的当前余额: {$client.balance|convert_amount}
    </p>
    <form action="{:U('Withdrawal/apply_approve')}" method="post" class="form-horizontal">
        <input type="hidden" name="id" value="{$data.id}" />
        <div class="form-item">
            <label class="item-label">收款帐户<span class="check-tips">（收款者的支付宝帐户）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" disabled value="{$data.alipay}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">打款金额<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large" disabled value="{$data.amount}">
            </div>
        </div>

        <div class="form-item">
            <label class="item-label">打款帐户<span class="check-tips">（打款者的支付宝帐户）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="dealName" value="{$data.dealName}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">打款备注<span class="check-tips"></span></label>
            <div class="controls">
                <textarea class="input-large" name="comment" value="{$data.comment}"></textarea>
            </div>
        </div>
        <notempty name="client">
        <div class="form-item">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
        </notempty>
    </form>
    
</div>

</block>
<block name="script">
<script type="text/javascript">
    $(function(){
        //搜索功能
        $("#search").click(function(){
            var url = $(this).attr('url');
            var status = $("#sch-sort-txt").attr("data");
            var query  = $('.search-form').find('input').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
            query = query.replace(/^&/g,'');
            if(status != ''){
                query += 'status=' + status + "&" + query;
            }
            if( url.indexOf('?')>0 ){
                url += '&' + query;
            }else{
                url += '?' + query;
            }
            window.location.href = url;
        });
    
        /* 状态搜索子菜单 */
        $(".search-form").find(".drop-down").hover(function(){
            $("#sub-sch-menu").removeClass("hidden");
        },function(){
            $("#sub-sch-menu").addClass("hidden");
        });
        $("#sub-sch-menu li").find("a").each(function(){
            $(this).click(function(){
                var text = $(this).text();
                $("#sch-sort-txt").text(text).attr("data",$(this).attr("value"));
                $("#sub-sch-menu").addClass("hidden");
            })
        });
    
        //回车自动提交
        $('.search-form').find('input').keyup(function(event){
            if(event.keyCode===13){
                $("#search").click();
            }
        });
        
    })
</script>
            
</block>
